package com.cmc.cloud.cmclink.doc.vo.blnoscnvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @author 周贤
 * @date 2025/8/29
 * 名称、地址、企业唯一识别码、国家代码、电话、邮箱、传真 、相关方类型     如果全部一样 则一样
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlnoScnCombineSameVO {

    @Schema(description = "相关方类型")
    private String partyTypeCode;

    @Schema(description = "公司客商主数据代码")
    private String csmCode;

    @Schema(description = "公司地址")
    private String companyAddress;

    @Schema(description = "国家代码")
    private String countryCode;

    @Schema(description = "电话")
    private String telephone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "传真")
    private String fax;

    @Schema(description = "邮政编码")
    private String zipCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BlnoScnCombineSameVO that = (BlnoScnCombineSameVO) o;
        return Objects.equals(partyTypeCode, that.partyTypeCode) &&
                Objects.equals(csmCode, that.csmCode) &&
                Objects.equals(companyAddress, that.companyAddress) &&
                Objects.equals(countryCode, that.countryCode) &&
                Objects.equals(telephone, that.telephone) &&
                Objects.equals(email, that.email) &&
                Objects.equals(fax, that.fax) &&
                Objects.equals(zipCode, that.zipCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(partyTypeCode, csmCode, companyAddress, countryCode, telephone, email, fax, zipCode);
    }
}
